/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.edu.amu.wmi.kino.visualjavafx.javafxcodegenerators.object;

import pl.edu.amu.wmi.kino.visualjavafx.javafxcodegenerators.api.Generator;
import pl.edu.amu.wmi.kino.visualjavafx.javafxcodegenerators.helpergenerators.EndGenerator;
import pl.edu.amu.wmi.kino.visualjavafx.javafxcodegenerators.object.interfaces.Generatable;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.path.ClosePathPathElement;

/**
 *
 * @author Admin
 */
public class ClosePathGenerator implements Generator,Generatable {

    @Override
    public boolean canGenerate(Object c) {
        if(c instanceof ClosePathPathElement)
            return true;
        else return false;
    }

    @Override
    public void generate(StringBuilder sb, Object o, int recursionLevel,Object original) {
        this.generateStart(sb);
        this.generateUniqueAttributes(sb, o,recursionLevel);
        this.generateEnd(sb);
    }

    @Override
    public void generateStart(StringBuilder sb) {
        sb.append("ClosePath{\n");
    }

    @Override
    public void generateEnd(StringBuilder sb) {
        EndGenerator.generateEnd(sb);
    }

    /**
     * Does nothing, currently in out model ClosePath doesn't have any attributes at all
     * @param sb
     * @param o
     */
    @Override
    public void generateUniqueAttributes(StringBuilder sb, Object o,int recursionLevel) {
    }

}
